using MoonFramework.Scripts.View.UI;
using MoonFramework.Template;
using UnityEngine;
using UnityEngine.UI;


namespace UI
{
    [UIElement(false, "UI/UI_PauseWindow", 4)]
    public class UI_PauseWindow : BaseUIWindow
    {
        [SerializeField] private Button continueButton;
        [SerializeField] private Button quitButton;

        public override void Init()
        {
            continueButton.onClick.AddListener(OnContinueButtonClick);
            quitButton.onClick.AddListener(OnQuitButtonClick);
        }

        private void OnContinueButtonClick()
        {
            GameSceneManager.Instance.UnPauseGame();
        }

        private void OnQuitButtonClick()
        {
            GameSceneManager.Instance.CloseAndSaveGame();
        }
    }
}